home *** CD-ROM | disk | FTP | other *** search
/ Aminet 43 / Aminet 43 (2001)(GTI - Schatztruhe)[!][Jun 2001].iso / Aminet / util / time / DRemind.lha / DRemind / DRemind-Install next >
Encoding:
Text File  |  2000-11-23  |  12.9 KB  |  651 lines

  1. ; $VER: Installation script for DRemind 1.0 (16.09.2000)
  2. ; © Alexander Döller
  3. ; Created with GoldED 6.17
  4. ; Minor modifications made by Daniel Westerberg
  5.  
  6. ;=============================================================================
  7. ; English strings
  8.  
  9. (if (= @language "english")
  10. (
  11. (set def_lang 0)
  12.  
  13. (set #incorectos
  14. (cat "Incorrect OS version (software requires OS 37 or better )!"
  15. ))
  16. (set #error1
  17. (cat "An error has occurred during installation. Please check the log file to understand the error."
  18. ))
  19. (set #insmode
  20. (cat "\nChoose the installation mode:"
  21. ))
  22. (set #installtext
  23. (cat "Install"
  24. ))
  25. (set #uninstalltext
  26. (cat "Uninstall"
  27. ))
  28. (set #inspath
  29. (cat "Please choose the installation path for the DRemind-Commodity:\n('SYS:WBStartup' is recommend if you want to start DRemind at startup time.)"
  30. ))
  31. (set #helpinspath
  32. (cat "If you specify 'SYS:WBStartup' the system will start DRemind at startup for you.\nIf you choose to install it to an other dir you will have to start it manually."
  33. ))
  34. (set #inspathprefs
  35. (cat "Please choose the installation path for the DRemind-Preferences program:\n('SYS:Prefs' is recommend if you want DRemind to be able to start the preferences program.)"
  36. ))
  37. (set #inspathprefshelp
  38. (cat "If you choose to install it to an other dir you will have to call DRemindPrefs yourself every time you want to change the prefs."
  39. ))
  40. (set #confdir
  41. (cat "Please choose the directory for the configuration file: ('ENVARC' = default)\nNote: If you set any other destination than ENVARC: don't forget to change the dir in DRemindPrefs as well!"
  42. ))
  43. (set #wichimage
  44. (cat "Which image to install?"
  45. ))
  46. (set #copyimage
  47. (cat "Copying image for DRemind ..."
  48. ))
  49. (set #wichicon
  50. (cat "Which icons to install?"
  51. ))
  52. (set #copyicon
  53. (cat "Copying icons for DRemind ..."
  54. ))
  55. (set #selectlanguage
  56. (cat "\nPlease select the language to install:\n"
  57. ))
  58. (set #language00
  59. (cat "English"
  60. ))
  61. (set #language01
  62. (cat "German"
  63. ))
  64. (set #language02
  65. (cat "Spanish"
  66. ))
  67. (set #language03
  68. (cat "French"
  69. ))
  70. (set #language04
  71. (cat "Hungarian"
  72. ))
  73. (set #language05
  74. (cat "Polish"
  75. ))
  76. (set #whatelse
  77. (cat "What to install else?"
  78. ))
  79. (set #documentation
  80. (cat "Documentation"
  81. ))
  82. (set #otherimages
  83. (cat "Other images for DRemind"
  84. ))
  85. (set #transdev
  86. (cat "Translation (for developers)"
  87. ))
  88. (set #readmefiles
  89. (cat "Readme files"
  90. ))
  91. (set #dirstuff
  92. (cat "Please choose the directory for the DRemind stuff:\n(A new dir will be created.)"
  93. ))
  94. (set #onlyremove
  95. (cat "DRemind can only be removed from the system if was installed with the default settings for the dirs!"
  96. ))
  97. (set #insaddfiles
  98. (cat "Did you install the additional files?"
  99. ))
  100. (set #yes
  101. (cat "Yes"
  102. ))
  103. (set #no
  104. (cat "No"
  105. ))
  106. (set #choosestuffdir
  107. (cat "Please choose the directory where you installed the DRemind stuff:"
  108. ))
  109. (set #uninscompl
  110. (cat "Uninstallation completed."
  111. ))
  112. )
  113. )
  114. ;=============================================================================
  115. ; German strings
  116.  
  117. (if (= @language "deutsch")
  118. (
  119. (set def_lang 1)
  120. )
  121. )
  122. ;=============================================================================
  123. ; Spanish strings
  124.  
  125. (if (= @language "español")
  126. (
  127. (set def_lang 2)
  128. )
  129. )
  130. ;=============================================================================
  131. ; French strings
  132.  
  133. (if (= @language "français")
  134. (
  135. (set def_lang 3)
  136. )
  137. )
  138. ;=============================================================================
  139. ; Hungarian strings are translated by Oborzin <oborzin@freemail.hu>
  140.  
  141. (if (= @language "magyar")
  142. (
  143. (set def_lang 4)
  144.  
  145. (set #incorectos
  146. (cat "Nem megfelelõ az OS verzió (OS 37 vagy újabb kell)!"
  147. ))
  148. (set #error1
  149. (cat "Hiba történt installáláskor. Ellenõrizd a log fájlt!"
  150. ))
  151. (set #insmode
  152. (cat "\nVálaszd ki hogy mit csináljak:"
  153. ))
  154. (set #installtext
  155. (cat "Install"
  156. ))
  157. (set #uninstalltext
  158. (cat "Uninstall"
  159. ))
  160. (set #inspath
  161. (cat "Válassz útvonalat a DRemind-Commodity-nak.\n('SYS:WBStartup' ajánlott)" 
  162. ))
  163. (set #helpinspath
  164. (cat " Ha a 'SYS:WBStartup' könyvtárat választod, a DRemind automatikusan elindul bootoláskor.\nHa másik helyre másolod, akkor az indításról neked kell gondoskodni!"
  165. ))
  166. (set #inspathprefs
  167. (cat "Válassz útvonalat a DRemind-Preferences programnak.\n('SYS:Prefs' ajánlott)"
  168. ))
  169. (set #inspathprefshelp
  170. (cat "Ha másik útvonalat választasz, a DRemind nem tudja majd elindítani a Prefs programot, így azt neked kell majd külön elindítani!"
  171. ))
  172. (set #confdir
  173. (cat "Válassz útvonalat a konfig-fájlnak. ('ENVARC' az alapbeállítás)\nHa más útvonalat választasz, állítsd be a Prefs programban!"
  174. ))
  175. (set #wichimage
  176. (cat "Melyik képet választod?"
  177. ))
  178. (set #copyimage
  179. (cat "Kép másolása..."
  180. ))
  181. (set #wichicon
  182. (cat "Melyik ikont választod?"
  183. ))
  184. (set #copyicon
  185. (cat "Ikonok másolása ..."
  186. ))
  187. (set #selectlanguage
  188. (cat "\nVálassz nyelvet:\n"
  189. ))
  190. (set #language00
  191. (cat "angol"
  192. ))
  193. (set #language01
  194. (cat "német"
  195. ))
  196. (set #language02
  197. (cat "spanyol"
  198. ))
  199. (set #language03
  200. (cat "francia"
  201. ))
  202. (set #language04
  203. (cat "magyar"
  204. ))
  205. (set #language05
  206. (cat "lengyel"
  207. ))
  208. (set #whatelse
  209. (cat "Még mit installáljak?"
  210. ))
  211. (set #documentation
  212. (cat "Dokumentáció"
  213. ))
  214. (set #otherimages
  215. (cat "Képek a DRemind-hez"
  216. ))
  217. (set #transdev
  218. (cat "Fordítás (fejlesztõknek)"
  219. ))
  220. (set #readmefiles
  221. (cat "Readme fájlok"
  222. ))
  223. (set #dirstuff
  224. (cat "Válassz könyvtárat a DRemind kiegészítõknek:\n(Nyitok neki egy új könyvtárat.)"
  225. ))
  226. (set #onlyremove
  227. (cat "Csak akkor tudom letörölni a DRemind-et a rendszeredrõl, ha az alapbeállítás szerint installáltad fel!"
  228. ))
  229. (set #insaddfiles
  230. (cat "A kiegészítõket is felinstalláltad?"
  231. ))
  232. (set #yes
  233. (cat "Igen"
  234. ))
  235. (set #no
  236. (cat "Nem"
  237. ))
  238. (set #choosestuffdir
  239. (cat "Válaszd ki a DRemind kiegészítõk könyvtárját!"
  240. ))
  241. (set #uninscompl
  242. (cat "A DRemind törlése befejezve."
  243. ))
  244. )
  245. )
  246. ;=============================================================================
  247. ; Polish strings
  248.  
  249. (if (= @language "polski")
  250. (
  251. (set def_lang 5)
  252. )
  253. )
  254. ; OTHER TRANSLATIONS HERE:
  255. ;=============================================================================
  256. ; START
  257. ;=============================================================================
  258.  
  259. (set @default-dest "ram:")
  260. (complete 0)
  261.  
  262. (if (< (/ (getversion) 65536) 37)
  263.     (
  264.         (abort #incorectos)
  265.     )
  266. )
  267.  
  268. ; error handling
  269.  
  270. (onerror
  271.     (if (> @ioerr 0)
  272.         (
  273.             (message
  274.                 (#error1)
  275.             )
  276.         )
  277.     )
  278.     (exit (quiet))
  279. )
  280.  
  281. (set #installmode
  282.   (askbool
  283.     (prompt #insmode)
  284.     (help @askbool-help)
  285.     (choices
  286.              #installtext
  287.              #uninstalltext
  288.              
  289.     )
  290.     (default 1)
  291.   )
  292. )
  293.  
  294. (if (= #installmode 1)
  295.  
  296.  ; normal installation
  297.  
  298.     (
  299.         (welcome)
  300.  
  301.      ; --- insert your code below ---
  302.  
  303.  
  304.    (set @CDty-dest
  305.      (askdir
  306.       (prompt #inspath)
  307.       (help #helpinspath)
  308.       (default "SYS:WBStartup/")
  309.      )
  310.    )
  311.  
  312. (COMPLETE 10)
  313.  
  314.    (set @Prefs-dest
  315.      (askdir
  316.       (prompt #inspathprefs)
  317.       (help #inspathprefshelp)
  318.       (default "SYS:Prefs/")
  319.      )
  320.    )
  321.  
  322. (COMPLETE 20)
  323.  
  324.    (copyfiles
  325.        (source "DRemind/DRemind")
  326.        (dest @CDty-dest)
  327.        (infos)
  328.        (optional "oknodelete" "force" "askuser")
  329.    )
  330.  
  331. (COMPLETE 30)
  332.  
  333.  
  334.    (copyfiles
  335.        (source "DRemind/DRemindPrefs")
  336.        (dest @Prefs-dest)
  337.        (infos)
  338.        (optional "oknodelete" "force" "askuser")
  339.    )
  340.  
  341. (COMPLETE 40)
  342.  
  343.    (set image_dir
  344.      (askdir
  345.       (prompt #confdir)
  346.       (help @askdir-help)
  347.       (default "ENVARC:")
  348.      )
  349.    )
  350.  
  351. (COMPLETE 50)
  352.  
  353. ;        uncomment if you want to show a picture of the available images
  354. ;   (run "run sys:utilities/multiview DRemind/DRemind.image" (safe))
  355.  
  356.    (set #result
  357.      (askchoice
  358.        (prompt #wichimage)
  359.        (help @askchoice-help)
  360.        (choices
  361.  
  362.           "1. - Amiga Boing"
  363.           "2. - New Hand in B/W"
  364.           "3. - New Hand in Red"
  365.           "4. - The Hand (default)"
  366.        )
  367.        (default 3)
  368.      )
  369.    )
  370.  
  371.  
  372.    (if (= #result 0)
  373.        (set image_source "DRemind/Images/Boing/")
  374.    )
  375.    (if (= #result 1)
  376.        (set image_source "DRemind/Images/NewHand_BW/")
  377.    )
  378.    (if (= #result 2)
  379.        (set image_source "DRemind/Images/NewHand_Red/")
  380.    )
  381.    (if (= #result 3)
  382.        (set image_source "DRemind/Images/TheHand/")
  383.    )
  384.  
  385.  
  386.    (working #copyimage)
  387.  
  388.    (copyfiles
  389.        (source (tackon image_source "DRemind.image"))
  390.        (dest image_dir)
  391.        (optional "nofail")
  392.    )
  393.  
  394. (COMPLETE 60)
  395.  
  396.    (set #result
  397.      (askchoice
  398.        (prompt #wichicon)
  399.        (help @askchoice-help)
  400.        (choices
  401.  
  402.           "1. - Standard 4-colour"
  403.           "2. - MagicWB"
  404.           "3. - OS3.5 GlowIcons"
  405.        )
  406.        (default 2)
  407.      )
  408.    )
  409.  
  410.  
  411.    (if (= #result 0)
  412.        (set image_source "DRemind/Icons/Old/")
  413.    )
  414.    (if (= #result 1)
  415.        (set image_source "DRemind/Icons/MagicWB")
  416.    )
  417.    (if (= #result 2)
  418.        (set image_source "DRemind/Icons/OS3.5/")
  419.    )
  420.  
  421.    (working #copyicon)
  422.  
  423.    (copyfiles
  424.        (source (tackon image_source "DRemind.info"))
  425.        (dest @CDty-dest)
  426.        (optional "nofail")
  427.    )
  428.    (copyfiles
  429.        (source (tackon image_source "DRemindPrefs.info"))
  430.        (dest @Prefs-dest)
  431.        (optional "nofail")
  432.    )
  433.    
  434.  
  435. (COMPLETE 70)
  436.  
  437.    (set #result
  438.      (askchoice
  439.        (prompt #selectlanguage)
  440.        (help @askchoice-help)
  441.        (choices
  442.  
  443.           #language00
  444.           #language01
  445.           #language02
  446.           #language03
  447.           #language04
  448.           #language05
  449.        )
  450.        (default #def_lang)
  451.      )
  452.    )
  453.  
  454.    (if (= #result 0)
  455.        (set language "english")
  456.    )
  457.    (if (= #result 1)
  458.        (set language "deutsch")
  459.    )
  460.    (if (= #result 2)
  461.        (set language "español")
  462.    )
  463.    (if (= #result 3)
  464.        (set language "français")
  465.    )
  466.    (if (= #result 4)
  467.        (set language "magyar")
  468.    )
  469.    (if (= #result 5)
  470.        (set language "polski")
  471.    )
  472.  
  473.    (copyfiles
  474.        (source (tackon "DRemind/Catalogs" language))
  475.        (dest (tackon "LOCALE:Catalogs" language))
  476.        (pattern "#?")
  477.        (optional "nofail" "force" "askuser")
  478.    )
  479.  
  480. (COMPLETE 80)
  481.  
  482.    (set #result
  483.      (askoptions
  484.        (prompt #whatelse)
  485.        (help @askoptions-help)
  486.        (choices
  487.  
  488.           #documentation
  489.           #otherimages
  490.           #transdev
  491.           #readmefiles
  492.        )
  493.        (default (+ 1 2 4 8))
  494.      )
  495.    )
  496.  
  497.    (if (= #result 0)
  498.        (exit)
  499.    )
  500.  
  501.    (set dest_dir
  502.      (askdir
  503.       (prompt #dirstuff)
  504.       (help @askdir-help)
  505.       (default "SYS:Utilities/")
  506.       (newpath)
  507.      )
  508.    )
  509.  
  510.    (set @default-dest dest_dir)
  511.  
  512. (COMPLETE 90)
  513.  
  514.    (set dest_dir (tackon dest_dir "DRemind"))
  515.  
  516.    (if (in #result 0)
  517.      (copyfiles
  518.        (source "DRemind/DRemind.Guide")
  519.        (dest dest_dir)
  520.        (infos)
  521.        (optional "oknodelete" "force" "askuser")
  522.      )
  523.    )
  524.  
  525.    (if (in #result 1)
  526.      (copyfiles
  527.        (source "DRemind/Images/")
  528.        (dest (tackon dest_dir "Images"))
  529.        (infos)
  530.        (pattern "#?")
  531.        (optional "oknodelete" "force" "askuser")
  532.      )
  533.    )
  534.  
  535.    (if (in #result 2)
  536.      (copyfiles
  537.        (source "DRemind/Translations/")
  538.        (dest (tackon dest_dir "Translations"))
  539.        (infos)
  540.        (files)
  541.        (pattern "#?")
  542.        (optional "oknodelete" "force" "askuser")
  543.      )
  544.    )
  545.  
  546.    (if (in #result 3)
  547.      (copyfiles
  548.        (source "DRemind/")
  549.        (dest dest_dir)
  550.        (infos)
  551.        (pattern "#?.Readme")
  552.        (optional "oknodelete" "force" "askuser")
  553.      )
  554.    )
  555.  
  556.  
  557. (COMPLETE 100)
  558.  
  559. ; --- end of your code ---
  560.  
  561.         (exit)
  562.     )
  563.  
  564.  ; uninstall application
  565.  
  566.     (
  567.      ; --- insert your code below ---
  568.  
  569.    (message #onlyremove)
  570.  
  571.    (delete "SYS:WBStartup/DRemind")
  572.    (delete "SYS:WBStartup/DRemind.info")
  573.  
  574. (COMPLETE 20)
  575.  
  576.    (delete "SYS:Prefs/DRemindPrefs")
  577.    (delete "SYS:Prefs/DRemindPrefs.info")
  578.  
  579. (COMPLETE 40)
  580.  
  581. ; remove all available language files
  582.    (delete (cat "LOCALE:Catalogs/english/DRemind.catalog"))
  583.    (delete (cat "LOCALE:Catalogs/english/DRemindPrefs.catalog"))
  584.  
  585.    (delete (cat "LOCALE:Catalogs/deutsch/DRemind.catalog"))
  586.    (delete (cat "LOCALE:Catalogs/deutsch/DRemindPrefs.catalog"))
  587.  
  588.    (delete (cat "LOCALE:Catalogs/español/DRemind.catalog"))
  589.    (delete (cat "LOCALE:Catalogs/español/DRemindPrefs.catalog"))
  590.  
  591.    (delete (cat "LOCALE:Catalogs/français/DRemind.catalog"))
  592.    (delete (cat "LOCALE:Catalogs/français/DRemindPrefs.catalog"))
  593.  
  594.    (delete (cat "LOCALE:Catalogs/magyar/DRemind.catalog"))
  595.    (delete (cat "LOCALE:Catalogs/magyar/DRemindPrefs.catalog"))
  596.  
  597.    (delete (cat "LOCALE:Catalogs/polski/DRemind.catalog"))
  598.    (delete (cat "LOCALE:Catalogs/polski/DRemindPrefs.catalog"))
  599.  
  600. (COMPLETE 60)
  601.  
  602.    (delete "ENVARC:DRemind.image")
  603.    (delete "ENVARC:DRemind.prefs")
  604.    (delete "ENVARC:DRemind.temp")
  605.    (delete "ENVARC:DRemind.temps")
  606.  
  607. ; remove MUI-settings as well
  608.    (delete "ENVARC:mui/DREMIND.prefs")
  609.    (delete "ENVARC:mui/DRPREFS.1.prefs")
  610.  
  611.  
  612.    (set #result
  613.        (askbool
  614.            (prompt #insaddfiles)
  615.            (help @askbool-help)
  616.            (choices
  617.  
  618.                #yes
  619.                #no
  620.            )
  621.            (default 1)
  622.        )
  623.    )
  624.  
  625. (COMPLETE 80)
  626.  
  627.    (if (= #result 1)
  628.    (
  629.      (set dest_dir
  630.        (askdir
  631.          (prompt #choosestuffdir)
  632.          (help @askdir-help)
  633.          (default "SYS:Utilities")
  634.          (newpath)
  635.        )
  636.      )
  637.      (run (cat "C:delete >NIL: " dest_dir "/DRemind ALL QUIET FORCE"))
  638.      (delete (cat dest_dir "/DRemind.info"))
  639.    ) )
  640.    
  641. (COMPLETE 100)
  642.  
  643. ; -- end of your code ---
  644.  
  645.         (message #uninscompl)
  646.         (exit (quiet))
  647.     )
  648. )
  649.  
  650.